﻿using AutoMapper;
using PublicClass;
using S.Breeding.Domain;
using S.Breeding.Read.Api.Application.Command.BodyMeasureCommand;
using S.Breeding.Read.Api.Application.Command.ConditionMeasureCommand;
using S.Breeding.Read.Api.Application.Command.DeathManageCommand;
using S.Breeding.Read.Api.Application.Command.OustManageCommand;
using S.Breeding.Read.Api.Application.Command.SheepWeighCommand;

namespace S.Breeding.Read.Api.Extensions
{
    public class BreedingProfile : Profile
    {
        public BreedingProfile()
        {
            //羊只称重
            CreateMap<SheepWeighListCommand, PageInfo<SheepWeigh>>().ReverseMap();

            CreateMap<SheepWeighEditCommand, SheepWeigh>().ReverseMap();
            //体尺测定
            CreateMap<BodyMeasureListCommand, PageInfo<BodyMeasure>>().ReverseMap();

            CreateMap<BodyMeasureEditCommand,BodyMeasure>().ReverseMap();
            //品相测定
            CreateMap<ConditionMeasureListCommand, PageInfo<ConditionMeasure>>().ReverseMap();

            CreateMap<ConditionMeasureEditCommand, ConditionMeasure>().ReverseMap();
            //死亡管理
            CreateMap<DeathManageListCommand, PageInfo<DeathManage>>().ReverseMap();

            CreateMap<DeathManageEditCommand, DeathManage>().ReverseMap();
            //淘汰管理
            CreateMap<OustManageListCommand, PageInfo<OustManage>>().ReverseMap();

            CreateMap<OustManageEditCommand, OustManage>().ReverseMap();
        }
    }
}
